home *** CD-ROM | disk | FTP | other *** search
- HZIP README FILE
-
- January 8, 1991
-
- DESCRIPTION
- -----------
-
- The HZIP program and associated files implements an algorithm for
- generating length-limited huffman codes, to be used in compressing
- files. Limiting the codes to a known length is useful because
- you can then pack the codes into known size words. For instance,
- as given here, you can guarantee codes <= 16 bits, which means
- the codes can be stored in two-byte words. Without such length
- limiting, there's no guarantee that the codes would fit.
-
- The algorithm used is called the Package-Merge algorithm as described
- in the paper "A Fast Algorithm for Optimal Length-Limited Huffman
- Codes", Lawrence L. Larmore and Daniel S. Hirschberg, JACM,
- Vol. 37, No.3, July 1990, pp. 464-473.
-
- This code is my interpretation of the algorithm, (it's presented
- rather abstractly in the paper). I hope I got it right.
-
- The straight-forward implementation of the algorithm consumes
- lots of memory and takes a fair amount of time. This implementation
- has been optimized as much as I know how, reducing the memory usage
- of the algorithm itself from over 200k, to around 64k, and speeding
- up the algorithm by at least double over the initial attempt.
-
- The authors Larmore and Hirschberg describe a modified algorithm
- which uses much less space, but they don't give the full algorithm
- and I couldn't make heads or tails out of what they did give. If
- anyone knows an implementation of this improved algorithm, I'd like
- to see it.
-
- The source code given is written in Turbo C++ 1.01. Project
- files are supplied to make it easy to re-compile the code.
-
-
- COPYRIGHT NOTICE
- ----------------
-
- The source code and associated files, as given in CONTENTS section
- is COPYRIGHT (c) 1991 AZARONA SOFTWARE. ALL RIGHTS RESERVED.
-
- The source code as given here is FREEWARE. That means you may use
- it in your own projects without charge. HOWEVER, THE SOFTWARE IS NOT
- PUBLIC DOMAIN. That means the copyright is still in effect, (which
- means YOU can't copyright it), and means that if you do use the
- source code, you must keep the embedded copyright notices intact.
- It also means YOU CAN'T CHARGE ANYONE ELSE TO USE THE CODE. Plus,
- if you give away the code, you must include all the files mentioned
- in the CONTENTS section, including this readme file.
-
- If you find a smaller, faster way to implement the package-merge
- algorithm, I'd like to hear about it.
-
-
- CONTENTS
- --------
-
- You should have the following files:
-
- readme.txt - This file
- hzip.exe - Huffman compressor
- hunzip.exe - Huffman decompressor
- hzip.prj - Project file for huffman compressor
- hunzip.prj - Project file for huffman decompressor
- hzip.cpp - Source to huffman compressor
- hunzip.cpp - Source to huffman decompressor
- pnode.h - Package node header file
- pnode.cpp - Package node source code
- pkmg.h - Package-merge algorithm header file
- pkmg.cpp - Package-merge algorithm source file
- huffenc.h - Huffman encoder header file
- huffenc.cpp - Huffman encoder source file
- huffdec.h - Huffman decoder header file
- huffdec.cpp - Huffman decoder source file
-
-
- RESTRICTIONS
- ------------
-
- The implementation given here is limited to a algoritm size
- of 4096. (The size of the algorithm is number of symbols *
- max number of levels. EG: 256 symbols by 16 levels, which
- would give you enough space for coding the 256 extended
- character set into 16-bit words.) Also, the maximum number
- of symbols is 256.
-
-
- CONTACTING THE AUTHOR
- ---------------------
-
- You may reach me at the following U.S. Mail and CompuServe
- e-mail addresses:
-
- Bryan Flamig
- Azarona Software
- P.O. Box 13433
- Denver, CO 80201
-
- Compuserve: 73057,3172
-
-
-
-
-